<#assign title="重置密码" /><#include 'member_header.html' />
<#assign checkFindPwdTag=newTag("checkFindPwdTag")/>
<#assign checkFindPwd=checkFindPwdTag("{'s':${s}}") />
<#if checkFindPwd.type==0>
	<form id="findPasswordForm">
		密码:<input type="password" name="password"/>
		确认密码:<input type="password" name="conpasswd"/>
		<input type="hidden" name="s" value="${checkFindPwd.s}"/>
		<input type="hidden" name="email" value="${checkFindPwd.email}"/><br/>
		<input type="button" value="申请" id="apply"/>
	</form>
	<#else>
	${checkFindPwd.message}	
</#if>
<script type="text/javascript">
$(function(){
	$("#apply").click(function(){
		var options = {
				url : "${ctx}/api/shop/findPasswordbyEmail/modify.do",
				type : "POST",
				dataType : "json",
				success : function(result) {
					if(result.result==0){
						alert(result.message);
					}else{
						alert(result.message);
					}
			 	},
			 	error : function(e) {
			 		alert('出现错误，请重试');
				}
			};
		
		$("#findPasswordForm").ajaxSubmit(options);
	});
})
</script>
<#include '../common/footer.html'/>